Skip to content

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Oct 18, 2022

See #1132

Run it so:

cd ci/sembr
cargo run -- ../../src [--overwrite]

Diff is large, so maybe should be automated.

@tshepang tshepang force-pushed the semantic-line-breaks branch from d1feea4 to 19d2632 Compare October 18, 2022 06:16
@JohnTitor
Copy link
Member

I don't have an objection to enforcing sembr but the implementation does look fragile, e.g. there's no tokenizer. Have you considered using an existing tool like https://github.com/bobheadxi/readable?

@tshepang
Copy link
Member Author

I have not... thanks for the suggestion, will have a look.

@JohnTitor JohnTitor added the S-waiting-on-author Status: this PR is waiting for additional action by the OP label Oct 22, 2022
@m-spitfire
Copy link

m-spitfire commented Jan 23, 2023

I have tried using readable to have a GitHub action that runs check, and format all the existing code, but the tool is immature, it gave errors for some files saying Cannot take length of multi-line node '[object Object]' (bobheadxi/readable#18) and for others the aforementioned issue is there, it does the wrong thing when it encounters e.g.(bobheadxi/readable#17). I am not sure what should be done here, make readable better or create another tool?

@tshepang
Copy link
Member Author

This tool of mine handles both issues without choking. I intend to get back to making it more fancy... I keep postponing.

@tshepang tshepang marked this pull request as draft March 6, 2023 06:58
@Noratrieb Noratrieb mentioned this pull request Mar 30, 2024
@jieyouxu jieyouxu added C-CI Category: CI for this repo A-style Area: style WG-rustc-dev-guide Working group: rustc-dev-guide labels Nov 4, 2024
@Kobzol
Copy link
Member

Kobzol commented Jan 5, 2025

Sorry, due to me messing up a git operation, we sadly had to force-push the whole commit history of rustc-dev-guide :( If you'd like to update this pull request, you will have to rebase it in a special way onto the new commit history (the new master):

git fetch origin --all
git checkout <pr-branch>
git rebase --onto origin/master origin/master-old
git push --force-with-lease

More context can be found here.

@tshepang tshepang force-pushed the semantic-line-breaks branch from 19d2632 to 4677a92 Compare October 14, 2025 04:27
@tshepang tshepang force-pushed the semantic-line-breaks branch from 4677a92 to ee0dd75 Compare October 15, 2025 12:04
@tshepang tshepang marked this pull request as ready for review October 15, 2025 12:33
@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Oct 15, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 15, 2025

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@tshepang
Copy link
Member Author

I don't know how to do tokenization, but I attached a sample chapter to show output from the tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-style Area: style C-CI Category: CI for this repo S-waiting-on-author Status: this PR is waiting for additional action by the OP S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content WG-rustc-dev-guide Working group: rustc-dev-guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants